﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Runtime.InteropServices;

namespace StartTesting
{
    class MyTreeView : System.Windows.Forms.TreeView
    {
        public MyTreeView() : base()
        {
            this.ShowRootLines = false;
            this.ShowLines = false;
            //this.HotTracking = true;
            this.FullRowSelect = true;
        }

        [DllImport("uxtheme.dll", CharSet = CharSet.Unicode)]
        private extern static int SetWindowTheme(IntPtr hWnd, string pszSubAppName,
        string pszSubIdList);
        protected override void CreateHandle()
        {
            base.CreateHandle();
            SetWindowTheme(this.Handle, "EXPLORER", null);
        }
    }
}
